package org.vt.eldercare.data;

import javax.swing.JLabel;

public class SampleRateDisplayRunnable implements Runnable {
	
	private Node node;
	
	private JLabel label;
	
	public SampleRateDisplayRunnable(Node n, JLabel label){
		node = n;
		this.label = label;
	}
	
	public void run() {
		while(!Thread.interrupted()){
			label.setText("" + node.getTempSampleCount());
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				break;
			}
		}
	}

}
